{% macro page(data, url) %}
    {% if data %}
        <ul class="pagination pagination-sm no-margin pull-right">
            {% if data.has_prev %}
                <li class="previous">
                    <a href="{{ url_for(url, page=data.prev_num) }}" style="color: #1e7e34">
                        <span aria-hidden="true" >&larr;</span>
                        Prev
                    </a>
                </li>
            {% else %}
                <li class="previous">
                    <a href="{{ url_for(url, page=1) }}" style="color: #1e7e34">
                        <span aria-hidden="true" style="color: #1e7e34">&larr;</span>
                        Prev
                    </a>
                </li>
            {% endif %}

            {% if data.has_next %}
                <li class="next">
                    <a href="{{ url_for(url, page=data.next_num) }}" style="color: #1e7e34">
                        Next
                        <span aria-hidden="true" style="color: #1e7e34">&rarr;</span>
                    </a>
                </li>
            {% else %}
                <li class="next">
                    <a href="{{ url_for(url, page=data.pages) }}" style="color: #1e7e34">
                        Next
                        <span aria-hidden="true" style="color: #1e7e34">&rarr;</span>
                    </a>
                </li>
            {% endif %}
        </ul>
    {% endif %}
{% endmacro %}